package basic.commons.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

public class URLReader {

	public static String getDate(String url) {
		try {
			URL yahoo = new URL(url);  
			BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));  
			String inputLine;  
			while ((inputLine = in.readLine()) != null)  
			return inputLine;
			in.close();
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return null;
	}


}
